package com.ymm.lulutong.mapper;

import com.ymm.lulutong.entity.Shipper;
import com.ymm.lulutong.entity.Wallet;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author guorui
 */
@Mapper
public interface ShipperWalletMapper {
    /**
     * 获取钱包
     *
     * @param shipperId 货主id
     * @return 货主余额
     */
    Wallet getWalletByShipperId(Long shipperId);

    /**
     * 修改余额
     *
     * @param shipperId    货主id
     * @param totalBalance 新的余额
     */
    void updateTotalBalanceByShipperId(@Param("shipperId") Long shipperId, @Param("totalBalance") Integer totalBalance);
}
